﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
    [Serializable]
    [Table(TableName = "WY_Shop", EntityType = EntityType.Table, IsGB = false)]
    public abstract class AbstractShop : CoreFrame.Business.AbstractBusines
    {
        private string _shopid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "ShopId", DataKey = true, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = true)]
        public string ShopId
        {
            get { return _shopid; }
            set { _shopid = value; }
        }
        private string _shopname;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "ShopName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string ShopName
        {
            get { return _shopname; }
            set { _shopname = value; }
        }
        private decimal _usearea;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "UseArea", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal UseArea
        {
            get { return _usearea; }
            set { _usearea = value; }
        }
        private string _ownerid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "OwnerId", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OwnerId
        {
            get { return _ownerid; }
            set { _ownerid = value; }
        }
        private string _ownername;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "OwnerName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OwnerName
        {
            get { return _ownername; }
            set { _ownername = value; }
        }
        private string _memo;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "Memo", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string Memo
        {
            get { return _memo; }
            set { _memo = value; }
        }
        private int _deleteflag;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "DeleteFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int DeleteFlag
        {
            get { return _deleteflag; }
            set { _deleteflag = value; }
        }

        public abstract bool Save(List<string> _roomId, List<string> _roomNumber);

        public abstract List<AbstractRoom> GetShopsRoomList(string _shopId);

        /// <summary>
        /// 根据门面名称获取门面以及关联的业主信息
        /// </summary>
        /// <param name="shopname"></param>
        /// <returns></returns>
        public abstract System.Data.DataTable GetShopAndOwnerList(string shopname, PageInfo page);
        public abstract bool Delete(string _shopid);
    }
}
